home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
utilitys
/
613
/
access
/
pick_acc.bat
< prev
next >
Wrap
DOS Batch File
|
1991-10-19
|
7KB
|
214 lines
echo {Ef}
set numact 0
for f \*.acc
if !{>= $numact 6}
move $f_pathname \accessor\!{tail $f_pathname}
else
set {active`$numact} !{root !{tail $f_pathname}}
set numact !{+ $numact 1}
set numinact 0
for f \accessor\*.acc
set {inactive`$numinact} !{root !{tail $f_pathname}}
set numinact !{+ $numinact 1}
set off 0
set col 4
while !{< $off $numact}
pos $col 1
echo ${active`$off}
set off !{+ $off 1}
set col !{+ $col 12}
set off 0
set row 5
set col 4
while !{< $off $numinact}
pos $col $row
echo ${inactive`$off}
set off !{+ $off 1}
if !{= $col 64}
set row !{+ $row 1}
set col 4
else
set col !{+ $col 12}
set prev_off 3
set prev_row 3
set prev_col 38
set off 3
set row 3
set col 38
set cont {OK}
while $cont
if !{= $prev_row 1}
pos $prev_col 1
echo ${active`$prev_off}
elseif !{= $prev_row 3}
pos $prev_col 3
echo { OK }
else
pos $prev_col $prev_row
echo ${inactive`$prev_off}
echo {p}
if !{= $row 1}
pos $col 1
echo ${active`$off}
elseif !{= $row 3}
pos $col 3
echo { OK }
else
pos $col $row
echo ${inactive`$off}
echo {q}
set prev_off $off
set prev_row $row
set prev_col $col
set key !{input -c}
if !{= $key {\15}}
if !{= $prev_row 1}
set prev_off $numinact
set prev_row !{+ !{/ $prev_off 6} 5}
set prev_col !{+ !{* !{mod $prev_off 6} 12} 4}
set numinact !{+ $numinact 1}
set numact !{- $numact 1}
pos $col $row
echo { }
pos 4 20
echo {M}
pos 4 23
move \${active`$off}.acc \accessor\
set {inactive`$prev_off} ${active`$off}
set {active`$off} ${active`$numact}
if !{= $off $numact}
if !{= $off 0}
set row 3
set col 38
else
set off !{- $off 1}
set col !{- $col 12}
pos !{+ !{* $numact 12} 4} 1
echo { }
elseif !{= $prev_row 3}
set cont {}
elseif !{< $numact 6}
set prev_off $numact
set prev_row 1
set prev_col !{+ !{* $prev_off 12} 4}
set numact !{+ $numact 1}
set numinact !{- $numinact 1}
pos $col $row
echo { }
pos 4 20
echo {M}
pos 4 23
move \accessor\${inactive`$off}.acc \
set {active`$prev_off} ${inactive`$off}
set {inactive`$off} ${inactive`$numinact}
if !{= $off $numinact}
if !{= $off 0}
set row 3
set col 38
else
set off !{- $off 1}
if !{= !{mod $off 6} 0}
set row !{- $row 1}
set col 64
else
set col !{- $col 12}
pos !{+ !{* !{mod $numinact 6} 12} 4} !{+ !{/ $numinact 6} 5}
echo { }
elseif !{= $key {\110}} ;up
if !{= $prev_row 1}
if !{> $numinact 0}
set off !{- $numinact 1}
set off !{+ !{- $off !{mod $off 6}} $prev_off}
set row !{+ !{/ $off 6} 5}
if !{>= $off $numinact}
set off !{- $numinact 1}
set col !{+ !{* !{mod $off 6} 12} 4}
elseif !{= $prev_row 3}
if !{> $numact 0}
if !{>= $off $numact}
set off !{- $numact 1}
set row 1
set col !{+ !{* $off 12} 4}
elseif !{< $prev_off 6}
set row 3
set col 38
else
set off !{- $prev_off 6}
set row !{- $prev_row 1}
elseif !{= $key {\120}} ;down
if !{= $prev_row 1}
set row 3
set col 38
elseif !{= $prev_row 3}
if !{> $numinact 0}
if !{>= $off $numinact}
set off !{- $numinact 1}
set row 5
set col !{+ !{* $off 12} 4}
else
set off !{+ $prev_off 6}
if !{>= $off $numinact}
set off !{- $numinact 1}
set row !{+ !{/ $off 6} 5}
set col !{+ !{* !{mod $off 6} 12} 4}
if !{and !{= $row $prev_row} !{> $numact 0}}
set off !{mod $prev_off 6}
if !{>= $off $numact}
set off !{- $numact 1}
set row 1
set col !{+ !{* $off 12} 4}
else
set row !{+ $row 1}
elseif !{= $key {\113}} ;left
if !{= $prev_row 1}
if !{= $off 0}
if !{> $numinact 0}
set off !{- $numinact 1}
set row !{+ !{/ $off 6} 5}
set col !{+ !{* !{mod $off 6} 12} 4}
else
set off !{- $off 1}
set col !{- $col 12}
elseif !{= $prev_row 3}
if !{> $numact 0}
set off !{- $numact 1}
set row 1
set col !{+ !{* $off 12} 4}
elseif !{= $prev_off 0}
set row 3
set col 38
else
set off !{- $prev_off 1}
if !{= !{mod $prev_off 6} 0}
set row !{- $prev_row 1}
set col 64
else
set col !{- $prev_col 12}
elseif !{= $key {\115}} ;right
if !{= $prev_row 1}
set off !{+ $prev_off 1}
if !{>= $off $numact}
set row 3
set col 38
else
set col !{+ $col 12}
elseif !{= $prev_row 3}
if !{> $numinact 0}
set off 0
set row 5
set col 4
else
set off !{+ $prev_off 1}
if !{>= $off $numinact}
if !{> $numact 0}
set off 0
set row 1
set col 4
elseif !{= $prev_col 64}
set row !{+ $row 1}
set col 4
else
set col !{+ $col 12}
echo {e}